var express = require('express');
var router = express.Router();

var api = require("../../../utils/api");

router.post('/', function (req, res) {
    api.api.reqBody(req);
    var path = api.api.urltoPath(req.baseUrl) + "/index.json";
    res.json(api.api.request(path));
})

router.get('/', function (req,res,next){
    api.api.reqBody(req);
    var path = api.api.urltoPath(req.baseUrl) + "/index.json";
    res.json(api.api.request(path));
})

module.exports = router;